package com.jack.design_patterns.creational.single;

/**
 * 饿汉式单例-静态代码块
 *  占用内存大，消耗系统资源
 */
public class StaticCodeBlockHungrySingleton {

    private static final StaticCodeBlockHungrySingleton INSTANCE;

    static {
        INSTANCE = new StaticCodeBlockHungrySingleton();
    }

    private StaticCodeBlockHungrySingleton() {

    }

    public static StaticCodeBlockHungrySingleton getInstance() {
        return INSTANCE;
    }
}
